<?php

use Illuminate\Routing\Router;

Route::group([
    'prefix'     => 'admin/EventSystem',
    'namespace'  => 'Buu\\Modules\\EventSystem\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {
    $router->get('db-instance/getDatabases', DbInstanceController::class.'@getDatabases');
    $router->get('db-instance/getTables', DbInstanceController::class.'@getTables');
    $router->get('event/{id}/getOptions', EventController::class.'@getOptions');
    $router->get('event/{id}/config', EventController::class.'@config');
    $router->get('event/{id}/configData', EventController::class.'@configData');
    $router->post('event/{id}/configSave', EventController::class.'@configSave');
    $router->resource('db-instance', DbInstanceController::class);
    $router->resource('maxwell-instance', MaxwellInstanceController::class);
    $router->resource('event', EventController::class);
    $router->resource('consumer', ConsumerController::class);
    $router->get('consumer/api/{basic_event_latitude_id}', 'ConsumerController@api')->name('consumer.api');
    $router->get('consumer/{id}/config', 'ConsumerController@config');
    $router->any('consumer/{id}/configSave', 'ConsumerController@configSave')->name('consumer.config');

    $router->get('/maxwell-instance/operate-create/{id}', 'MaxwellInstanceController@operateCreate');

    $router->get('consumer/{id}/setConfig', 'ConsumerController@setConfig');

    //渠道管理
    $router->resource('channel', ChannelController::class);
    $router->get('/channel/operate-create/{id}', 'ChannelController@operateCreate');
    $router->get('/channel/operate-stop/{id}', 'ChannelController@operateStop');
//    $router->resource('consumerConfig/{id}', ConsumerConfigController::class);

    //url管理
    $router->resource('apiUrl', ApiUrlController::class);

});

